﻿using System.Collections.Generic;
using System.Linq;
using Abp.Application.Navigation;
using Abp.Domain.Repositories;
using Abp.Localization;

namespace XHD.WXZJ.Web
{
    /// <summary>
    /// This class defines menus for the application.
    /// It uses ABP's menu system.
    /// When you add menu items here, they are automatically appear in angular application.
    /// See .cshtml and .js files under App/Main/views/layout/header to know how to render menu.
    /// </summary>
    public class WXZJNavigationProvider : NavigationProvider
    {
   
        public override void SetNavigation(INavigationProviderContext context)
        {
            #region 单页面模板菜单
#if Spa
            context.Manager.MainMenu
                .AddItem(
                    new MenuItemDefinition(
                        "Home",
                        new LocalizableString("HomePage", WXZJConsts.LocalizationSourceName),
                        url: "#/",
                        icon: "fa fa-home"
                        )
                ).AddItem(
                    new MenuItemDefinition(
                        "About",
                        new LocalizableString("About", WXZJConsts.LocalizationSourceName),
                        url: "#/about",
                        icon: "fa fa-info"
                        )
                );
#endif
            #endregion
            #region MVC模板菜单
#if Mpa
            
            context.Manager.MainMenu
                .AddItem(
                    new MenuItemDefinition(
                        "Home",
                        new LocalizableString("HomePage", WXZJConsts.LocalizationSourceName),
                        url: "/",
                        icon: "fa fa-home"
                        ).AddItem(
                    new MenuItemDefinition(
                        "UserManager",
                        new LocalizableString("UserManager", WXZJConsts.LocalizationSourceName),
                        url: "/About",
                        icon: "fa fa-info"
                        ))
                        .AddItem(
                    new MenuItemDefinition(
                        "UserManager2",
                        new LocalizableString("UserManager2", WXZJConsts.LocalizationSourceName),
                        url: "#/usermanager",
                        icon: "fa fa-info"
                        )
                    )
                    ).AddItem(
                    new MenuItemDefinition(
                        "About",
                        new LocalizableString("About", WXZJConsts.LocalizationSourceName),
                        url: "/About",
                        icon: "fa fa-info"
                        ).AddItem(
                    new MenuItemDefinition(
                        "UserManager3",
                        new LocalizableString("UserManager3", WXZJConsts.LocalizationSourceName),
                        url: "#/usermanager",
                        icon: "fa fa-info"
                        ))
                        .AddItem(
                    new MenuItemDefinition(
                        "UserManager4",
                        new LocalizableString("UserManager4", WXZJConsts.LocalizationSourceName),
                        url: "/RolesMgr/Index",
                        icon: "fa fa-info"
                        )
                    )
                );
            //context.Manager.MainMenu
            //    .AddItem(
            //        new MenuItemDefinition(
            //            "Home",
            //            new LocalizableString("HomePage", WXZJConsts.LocalizationSourceName),
            //            url: "/",
            //            icon: "fa fa-home"
            //            )
            //    ).AddItem(
            //        new MenuItemDefinition(
            //            "About",
            //            new LocalizableString("About", WXZJConsts.LocalizationSourceName),
            //            url: "/About",
            //            icon: "fa fa-info"
            //            )
            //    );
#endif
            #endregion
        }


    }
}
